<?php
// Part of mmvc library, https://code.google.com/p/mmvc/
// Dependencies: None

/**
 * Thrown if input filtering fails.
 * @see InputFilter
 */
class InputError extends Exception {
	/** Failed input field or '' if not defined */
	public $field;
	
	/** Failed input value or '' if not defined */
	public $value;
	
	/** Constructs InputError with specified message and optional field and value. */
	function __construct( $msg, $field='', $value='' ) {
		$this->field = $field;
		$this->value = $value;
		parent::__construct( $msg );
	}
}

?>